#pragma once
#include "MyHeaders.h"

class MainScene :
	public CCLayer
{
public:
	MainScene(void);
	~MainScene(void);

	static CCScene* scene();
	virtual bool init();
	virtual void keyBackClicked();
	CREATE_FUNC(MainScene);

	void onMenuClick(CCObject* pSender,TouchEventType type);
private:
	int WIN_W;
	int WIN_H;

	static const int TAG_ENTERGAME = 101;
	static const int TAG_RANK = 102;
	static const int TAG_MUSIC = 103;

	CCLabelBMFont* highestScoreLabe;
	UILayer* btnLayer;
	UIButton* enterGameBtn;
	UIButton* rankBtn;
	UIButton* musicBtn;
	UIButton* createBtn(const char* name,int tag);
	void initData();
};

class CCQuitDialog
	: public CCNode
{
public:
	CCQuitDialog();
	~CCQuitDialog();
	virtual bool init();
	CREATE_FUNC(CCQuitDialog);
	void onMenuClick(CCObject* pSender,TouchEventType type);
	
private:
	static const int TAG_OK = 101;
	static const int TAG_CANCEL = 102;

	int WIN_W;
	int WIN_H;

	UILayer* btnLayer;
	UIButton* createBtn(const char* name,int tag);
	void removeSelfOnAnimOver(CCNode* node);
};